//
//  budaitudeViewController.m
//  wuyeviewcon
//
//  Created by dsdf on 16/1/18.
//  Copyright © 2016年 joey. All rights reserved.
//

#import "budaitudeViewController.h"

@interface budaitudeViewController ()

@end

@implementation budaitudeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
//    UIButton *checkbox=[[UIButton alloc]init];
//    
//    [self.view addSubview:checkbox];
//    
//    checkbox.frame=CGRectMake(60,330,20,20);
//    
//    [checkbox setImage:[UIImage imageNamed:@"check_off.png"]forState:UIControlStateNormal];
//    
//    //设置正常时图片为    check_off.png
//    
//    [checkbox setImage:[UIImage imageNamed:@"check_on.png"]forState:UIControlStateSelected];
//    
//    //设置点击选中状态图片为check_on.png
//    
//    [checkbox addTarget:selfaction:@selector(checkboxClick:)forControlEvents:UIControlEventTouchUpInside];
//    
//    [checkbox setSelected:YES];
//
    
    UIButton *button=[[UIButton alloc]init];
    button.frame=CGRectMake(0, 0, 375, 64);
    button.backgroundColor=[UIColor colorWithRed: 230/255.0 green:55/255.0 blue:55/255.0 alpha:1.0];
    [self.view addSubview:button];
    
    
    UILabel *labletext=[[UILabel alloc]init];
    labletext.frame=CGRectMake(155, 34, 66, 14);
    labletext.text=@"调查问卷";
    labletext.adjustsFontSizeToFitWidth=YES;
    labletext.textColor=[UIColor whiteColor] ;
    [self.view addSubview:labletext];
    
    
    
    UIButton *button1=[[UIButton alloc]init ];//]WithFrame:CGRectMake(50, 50, 20, 20)];
    button1.frame=CGRectMake(22, 35, 20, 20);
    [button1 setBackgroundImage:[UIImage imageNamed:@"return@2x.png"] forState:UIControlStateNormal];
    [button1 addTarget:self action:@selector(fanhui:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button1];
    
    
    
    
    

    
    
    UIButton *checkbox1 = [UIButton buttonWithType:UIButtonTypeCustom];
    checkbox1.frame=CGRectMake(25 ,390,15,15);
    
    [checkbox1 setImage:[UIImage imageNamed:@"yuan未勾选状态@2x.png"] forState:UIControlStateNormal];
    [checkbox1 setImage:[UIImage imageNamed:@"yuan勾选状态@2x.png"] forState:UIControlStateSelected];
    [checkbox1 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox1];
    
    
    
    
    UIButton *checkbox2 = [UIButton buttonWithType:UIButtonTypeCustom];
 checkbox2.frame=CGRectMake(25 ,413,15,15);
    
    [checkbox2 setImage:[UIImage imageNamed:@"yuan未勾选状态@2x.png"] forState:UIControlStateNormal];
    [checkbox2 setImage:[UIImage imageNamed:@"yuan勾选状态@2x.png"] forState:UIControlStateSelected];
    [checkbox2 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox2];
    
    
    
    UIButton *checkbox3 = [UIButton buttonWithType:UIButtonTypeCustom];
    
 checkbox3.frame=CGRectMake(25 ,430,15,15);
    
    [checkbox3 setImage:[UIImage imageNamed:@"yuan未勾选状态@2x.png"] forState:UIControlStateNormal];
    [checkbox3 setImage:[UIImage imageNamed:@"yuan勾选状态@2x.png"] forState:UIControlStateSelected];
    [checkbox3 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox3];
    
    
    UIButton *checkbox4 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox4.frame=CGRectMake(23,613,330,45);
    
    [checkbox4 setImage:[UIImage imageNamed:@"投票@2x.png"] forState:UIControlStateNormal];
    [checkbox4 setImage:[UIImage imageNamed:@"你已投票@2x.png"] forState:UIControlStateSelected];
    [checkbox4 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox4];
    
    
    
    UIButton *checkbox5 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox5.frame=CGRectMake(25 ,227,15,15);
    
    [checkbox5 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox5 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox5 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox5];
    
    
    
    
    UIButton *checkbox6 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox6.frame=CGRectMake(25 ,245,15,15);
    
    [checkbox6 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox6 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox6 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox6];
    
    
    
    
    UIButton *checkbox7 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox7.frame=CGRectMake(25 ,268,15,15);
    
    [checkbox7 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox7 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox7 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox7];
    
    
    
    
    UIButton *checkbox8= [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox8.frame=CGRectMake(25 ,318,15,15);
    
    [checkbox8 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox8 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox8 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox8];
    
    
    
    
    UIButton *checkbox9 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox9.frame=CGRectMake(25 ,341,15,15);
    
    [checkbox9 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox9 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox9 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox9];
    
    
    
    
    UIButton *checkbox10 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox10.frame=CGRectMake(25 ,481,15,15);
    
    [checkbox10 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox10 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox10 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox10];
    
    
    
    
    UIButton *checkbox11 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox11.frame=CGRectMake(25 ,504,15,15);
    
    [checkbox11 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox11 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox11 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox11];
    
    
    UIButton *checkbox12 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    checkbox12.frame=CGRectMake(25 ,526,15,15);
    
    [checkbox12 setImage:[UIImage imageNamed:@"fang未勾选状态1@2x.png"] forState:UIControlStateNormal];
    [checkbox12 setImage:[UIImage imageNamed:@"fang勾选状态1@2x.png"] forState:UIControlStateSelected];
    [checkbox12 addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:checkbox12];
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
}



- (IBAction)fanhui:(id)sender {
    [self dismissModalViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


-(void)checkboxClick:(UIButton *)btn
{
    btn.selected = !btn.selected;
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
